using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmPurchaseOrderInstallment")]
    public class PurchaseOrderInstallment
    {
        public PurchaseOrderInstallment()
        {
        }
    

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "IcmPoInstallId", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public int PoInstallId { get; set; }

        [ForeignKey("PurchaseOrder")]
		[DataMember, Display(Name = "IcmPoId", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<int> PoId { get; set; }

		[DataMember, Display(Name = "IcmPoInstallNumber", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<int> InstallNumber { get; set; }

		[DataMember, Display(Name = "DeliveryDate", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<System.DateTime> DeliveryDate { get; set; }

		[DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public string Remarks { get; set; }

		[DataMember, Display(Name = "RedemptionAmount", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<double> RedemptionAmount { get; set; }

		[DataMember, Display(Name = "DeductionAmount", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<double> DeductionAmount { get; set; }

		[DataMember, Display(Name = "RequireDuration", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<int> RequireDuration { get; set; }

        [ForeignKey("DurationType")]
		[DataMember, Display(Name = "IcmDurTypeId", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<int> DurTypeId { get; set; }

		[DataMember, Display(Name = "RequireDate", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<System.DateTime> RequireDate { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.PurchaseOrderInstallmentResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }
    

		[DataMember]
        public virtual PurchaseOrder PurchaseOrder { get; set; }

		[DataMember]
        public virtual IcmMasLookUp DurationType { get; set; }

        [DataMember, NotMapped]
        public decimal TotalAmount { get; set; }
    }
}